﻿using System.Collections.ObjectModel;
using Dsl.Ped.AddIn.Beeps.Style;
using System.ComponentModel.Composition;
using Dsl.Ped.AddIn.Beeps.Generated;
using Dsl.Ped.Framework.AddIns;
using Dsl.Ped.Framework.Common;

namespace Dsl.Ped.AddIn.Beeps
{
    /// <summary>
    /// This is the implementation of the Beeps AddIn
    /// It properly exports all metadata required by the DSLPed
    /// </summary>
    [Export(typeof(IDslPedAddIn))]
    [ExportMetadata("Extension", "beeps")]
    [ExportMetadata("Name", "Beeps")]
    [ExportMetadata("ProjectiveType", typeof(Beeps.Generated.Beeps))]
    [ExportMetadata("Namespace", "http://Beeps")]
    [ExportMetadata("ResourceDictionary", typeof(BeepsResourceDictionary))]
    [ExportMetadata("ImageUri", "beeps_32.png")]
    [ExportMetadata("Description", "DSL representing a Beeps language. Beeps was introduced in a tutorial of DSLPed.")]
    public class BeepsAddIn : IDslPedAddIn
    {
        /// <summary>
        /// Gets the default object used for the instantiation of a new Beeps source code object
        /// </summary>
        /// <returns>Object representing the default Beeps source code</returns>
        public IProjective GetDefaultObject()
        {
            return new Beeps.Generated.Beeps() { Beep = new ObservableCollection<BeepsBeep>() { new BeepsBeep() { frequence = 10 }, new BeepsBeep() { frequence = 20 } } };
        }
    }
}
